From 95e8b4713437b9c2f20953c6c752169a78030f4f Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Sat, 17 Jan 2015 00:55:58 -0800 Subject: [PATCH] Add note about specifying dependencies. --- src/doc/guide.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/doc/guide.md b/src/doc/guide.md index f44c83684..1cc1b37a2 100644 --- a/src/doc/guide.md +++ b/src/doc/guide.md @@ -96,6 +96,17 @@ Hello, world! You'll now notice a new file, `Cargo.lock`. It contains information about our dependencies. Since we don't have any yet, it's not very interesting. +## Adding a dependency + +It's quite simple to add a dependency. Simply add it to your `Cargo.toml` file: + +```toml +[dependencies] +time = "0.1.12" +``` + +Re-run `cargo build` to download the dependencies and build your source with the new dependencies. + # Working on an existing Cargo project If you download an existing project that uses Cargo, it's really easy -- 2.30.2